From 4b8e0f9ae34f8d31594c38a525cf98a8c6453678 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Mon, 17 Feb 2025 17:20:57 +0100 Subject: [PATCH] Don't display the option to change update channels when server has valid subscription. Signed-off-by: Camila Ayres --- src/gui/generalsettings.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index d6aec9821..d4a0aeaa4 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -326,6 +326,12 @@ void GeneralSettings::loadMiscSettings() #if defined(BUILD_UPDATER) void GeneralSettings::loadUpdateChannelsList() { ConfigFile cfgFile; + if (cfgFile.serverHasValidSubscription()) { + _ui->updateChannel->hide(); + _ui->updateChannelLabel->hide(); + return; + } + const auto validUpdateChannels = cfgFile.validUpdateChannels(); if (_currentUpdateChannelList.isEmpty() || _currentUpdateChannelList != validUpdateChannels){ _currentUpdateChannelList = validUpdateChannels; @@ -333,7 +339,6 @@ void GeneralSettings::loadUpdateChannelsList() { _ui->updateChannel->addItems(_currentUpdateChannelList); const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel()); _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1 ? currentUpdateChannelIndex : 0); - _ui->updateChannel->setDisabled(cfgFile.serverHasValidSubscription()); connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged); } } -- 2.30.2